import request from '@/utils/request.js'
// 获取列表
export const gethouseListApi = (params)=>{
    return request({
        url:'/house/building',
        method:'get',
        params
    })
}
export const getHhApi = (id)=>{
    return request({
        url:'/house/index?building_code='+id,
        method:'get',
    })
}
// 获取详情
export const gethouseInfoApi = (id)=>{
    return request({
        url:'/house/building/'+id,
        method:'get',
    })
}

// 获取栋数
export const gethouse = (id)=>{
    return request({
        url:'/house/building?community_code='+id,
        method:'get',
    })
}
export const getPayApi = (id)=>{
    return request({
        url:'/expenses/project?community_code='+id,
        method:'get',
    })
}
// 新增数据
export const addhouseApi = (data)=>{
    return request({
        url:'/house/building',
        method:'post',
        data
    })
}

// 修改数据
export const edithouseApi = (data)=>{
    return request({
        url:'/house/building/'+data.id,
        method:'put',
        data
    })
}

// 删除
export const delhouseApi = (id)=>{
    return request({
        url:'/house/building/'+id,
        method:'delete'
    })
}
